#define LOG_TAG "IPLM_HAL.SERVICE"

#include <hidl/HidlTransportSupport.h>
#include "Iplm.h"
#include <android-base/logging.h>

using namespace android;
using namespace android::hardware;
using namespace ::vendor::ecarx::xma::iplm::V1_0::implementation;

int main(int /* argc */, char ** /* argv */)
{
    configureRpcThreadpool(10, true);
    sp<Iplm> iplm = new Iplm();
    if (!iplm->initialize()) {
        ALOGI("IPLM initialize failed...");
        return 1;
    }

    ALOGI("----------> registering iplm service");
    status_t status = iplm->registerAsService();
    if (status != OK) {
        ALOGI("Unable to register iplm service (%d)", status);
        return 1;
    } else {
        ALOGI("register iplm success");
    }

    joinRpcThreadpool();
    return 1; // joinRpcThreadpool shouldn't exit
}
